package com.cyt.wx.service;

import com.cyt.base.model.dto.ReturnResult;
import com.cyt.wx.model.po.WxEducationUser;
import com.cyt.wx.model.po.WxMember;
import com.cyt.wx.model.vo.WxEducationUserVo;
import com.cyt.sys.model.po.SysUser;
import com.cyt.sys.service.BaseService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 学校通用用户模块-基础用户Service层接口类
 *
 * @author han jun
 * @date 2019-8-29 13:41:23
 */
public interface WxEducationUserService extends BaseService<WxEducationUser> {

    /**
     * 查询对象集合
     *
     * @param wxEducationUserVo 对象
     * @return List 对象集合
     * @author han jun
     * @date 2019-8-29 13:41:23
     */
    List<WxEducationUser> listExample(WxEducationUserVo wxEducationUserVo);

    /**
     * 分页查询
     *
     * @param wxEducationUserVo 接受参数对象
     * @param pageNum          分页数
     * @param pageSize         每页显示条数
     * @return ReturnResult
     * @author han jun
     * @date 2019-8-29 13:41:23
     */
    ReturnResult page(WxEducationUserVo wxEducationUserVo, int pageNum, int pageSize);

    /**
     * 添加或更新
     *
     * @param wxEducationUserVo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author han jun
     * @date 2019-8-29 13:41:23
     */
    ReturnResult addOrUpdate(WxEducationUserVo wxEducationUserVo, SysUser sysUser);


    /**
     * 学生照片审核的分页界面
     *
     * @param wxEducationUserVo 接受参数对象
     * @param pageNum          分页数
     * @param pageSize         每页显示条数
     * @return ReturnResult
     * @author han jun
     * @date 2019-8-29 13:41:23
     */
    ReturnResult pageNewImageStudent(WxEducationUserVo wxEducationUserVo, int pageNum, int pageSize);


    /**
     * 更新一寸照片接口
     *
     * @param wxEducationUserVo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author han jun
     * @date 2019-8-29 13:41:23
     */
    ReturnResult updateOneImage(WxEducationUserVo wxEducationUserVo, SysUser sysUser);


    /**
     * 多个图片审核
     *
     * @param wxEducationUserVo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author han jun
     * @date 2019-8-29 13:41:23
     */

     ReturnResult updateMoreImage(WxEducationUserVo wxEducationUserVo, SysUser sysUser,String ids);

    /**
     * 根据条件逻辑删除
     *
     * @param wxEducationUserVo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author han jun
     * @date 2019-8-29 13:41:23
     */
    ReturnResult remove(WxEducationUserVo wxEducationUserVo, SysUser sysUser);

    /**
     * 重置密码
     * @param wxEducationUserVo
     * @param sysUser
     * @author congcong tao
     * @date 2019/9/6 8:55
     */
    ReturnResult resetPassword(WxEducationUserVo wxEducationUserVo, SysUser sysUser);

    /**
     * 根据条件物理删除
     *
     * @param wxEducationUserVo 参数接受对象
     * @param sysUser      当前用户
     * @return ReturnResult
     * @author han jun
     * @date 2019-8-29 13:41:23
     */
    ReturnResult delete(WxEducationUserVo wxEducationUserVo, SysUser sysUser);

    /**
     * 查询老师人数，管理员及教师，userType是1和2
     * @author congcong tao
     * @date 2019/9/2 13:48
     */
    Integer selectTeacherCount();

    /**
     * 查询学生人数，userType是3
     * @author congcong tao
     * @date 2019/9/2 13:49
     */
    Integer selectStudentCount();

    /**
     * 批量保存
     * @param list
     * @author congcong tao
     * @date 2019/9/3 14:22
     */
    void insertList(List<WxEducationUser> list);

    /**
     * 根据memberId查询是否存在
     * @param memberId
     * @author congcong tao
     * @date 2019/9/4 16:11
     */
    boolean checkByMemberId(String memberId);

    WxEducationUser selectEducationUserByMemberId(String memberId);

    /**
     * 导入数据
     * @author congcong tao
     * @date 2019/9/6 8:36
     */
    ReturnResult importData(HttpServletRequest request, MultipartFile file, String catalog, String update, String applyId, SysUser sysUser);

    /**
     * 校验工号唯一性，多账号下可以允许userNumber同名
     * @param id
     * @param userNumber
     * @param createUser 创建者，多账号
     * @author congcong tao
     * @date 2019/9/6 9:48
     */
    boolean checkUserNumberUnique(String id, String userNumber, String createUser);

    /**
     * 登录
     * @param wxMember
     * @param loginName
     * @param password
     * @author congcong tao
     * @date 2019/9/10 9:30
     */
    ReturnResult login(WxMember wxMember, String loginName, String password);

     /**
      * 获取教师人员选择器
      *
      * @param wxEducationUserVo 筛选条件
      * @return ReturnResult
      * @author Jun Han
      * @date 2019/9/26 15:59
      */
     ReturnResult selector(WxEducationUserVo wxEducationUserVo);

     /**
      * 获取id 对应的学号
      *
      * @param ids
      * @return ReturnResult
      * @author Jun Han
      * @date 2019/9/26 17:22
      */
    ReturnResult getAllteacherNumber(String ids);

    /**
     * 获取工号 对应的id
     *
     * @param userNumbers
     * @return ReturnResult
     * @author Jun Han
     * @date 2019/9/26 17:22
     */

     ReturnResult getAllIdsByUserNumber(String userNumbers,String createUser);
}